package com.ellricky.teacher.ui.mycourse.experience

import com.ellricky.baselib.http.callback.ECallback
import com.ellricky.baselib.ui.base.BaseDetailActivity
import com.ellricky.teacher.API_EXPERIENCE_SUMUP_DETAIL
import com.ellricky.teacher.R
import com.ellricky.teacher.TcSumupDetailEntity
import kotlinx.android.synthetic.main.tc_activity_experience_detail.*

class ExperienceDetailActivity : BaseDetailActivity() {

    override fun getContentLayout(): Int {
        return R.layout.tc_activity_experience_detail
    }

    override fun initUIView() {
        super.initUIView()
        mTvTitle.text = getString(R.string.tc_experience_sum_up)
        loadDetailData(id)
    }


    private fun loadDetailData(id: String) {
        mPresenter.loadDetail(API_EXPERIENCE_SUMUP_DETAIL, id, object : ECallback<TcSumupDetailEntity>(this) {
            override fun onSuccess(data: TcSumupDetailEntity?, msg: String) {
                tvCourse.text = data?.classInfo
                tvConnect.text = data?.communicate
                tvSign.text = data?.formResult
                tvResult.text = data?.workResult
            }
        })
    }


}
